/* 营销-预订货
 */

import { postRequest, getRequest, getDownload } from '@/lib/axios'

export const contractApi = {
  // 预订货
  queryBookList: (param) => {
    return getRequest('/book_order/list', param)
  },
  // 导出
  exportXlsx: (param) => {
    return getDownload('/book_order/exportXlsx', param)
  },
  // 新增
  addBook: (param) => {
    return postRequest('/book_order/add', param)
  },
  // 编辑
  editBook: (param) => {
    return postRequest('/book_order/edit', param)
  },
  // 修改
  modifyBook: (param) => {
    return postRequest('/book_order/modify', param)
  },
  // 删除
  delBook: (param) => {
    return postRequest('/book_order/del', param)
  },
  // 详情
  detailBook: (param) => {
    return getRequest('/book_order/detail', param)
  },
  // 预订货订单--收款
  doPayment: (param) => {
    return postRequest('/book_order/do_payment', param)
  },
  // 预订货订单--退款
  doRefund: (param) => {
    return postRequest('/book_order/do_refund', param)
  },
  // 预订货订单--转预付款
  doTransfer: (param) => {
    return postRequest('/book_order/do_transfer', param)
  }
}
